<?php
/**
 * UserChangePassword class.
 * UserChangePassword is the data structure for keeping
 * user change password form data. It is used by the 'changepassword' action of 'UserController'.
 */
class UserChangePassword extends CFormModel {
        public $password;
        public $verifyPassword;
        
        public function rules() {
                return array(
                        array('password, verifyPassword', 'required'),
                        array('password, verifyPassword', 'length', 'max'=>128, 'min' => 4,'message' => "Incorrect password (minimal length 4 symbols)."),
                        array('verifyPassword', 'compare', 'compareAttribute'=>'password', 'message' => "Retype Password is incorrect."),
                );
        }

        /**
         * Declares attribute labels.
         */
        public function attributeLabels()
        {
                return array(
                        'password'=>"password",
                        'verifyPassword'=>"Retype Password",
                );
        }
} 